diff --git a/igb/Makefile b/igb/Makefile
index 8e962f7..2c10939 100644
--- a/igb/Makefile
+++ b/igb/Makefile
@@ -38,7 +38,7 @@ ifeq (,$(BUILD_KERNEL))
 BUILD_KERNEL=$(shell uname -r)
 endif
 
-DRIVER_NAME=igb
+DRIVER_NAME=igb$(NETMAP_DRIVER_SUFFIX)
 
 
 ###########################################################################
@@ -141,7 +141,7 @@ ifeq ($(ARCH),ppc64)
 endif
 
 # extra flags for module builds
-EXTRA_CFLAGS += -DDRIVER_$(shell echo $(DRIVER_NAME) | tr '[a-z]' '[A-Z]')
+EXTRA_CFLAGS += -DDRIVER_$(shell echo $(DRIVER_NAME) | tr '[a-z-]' '[A-Z_]')
 EXTRA_CFLAGS += -DDRIVER_NAME=$(DRIVER_NAME)
 EXTRA_CFLAGS += -DDRIVER_NAME_CAPS=$(shell echo $(DRIVER_NAME) | tr '[a-z]' '[A-Z]')
 # standard flags for module builds
@@ -355,6 +355,9 @@ DEPVER := $(shell /sbin/depmod -V 2>/dev/null | \
 $(MANFILE).gz: ../$(MANFILE)
 	gzip -c $< > $@
 
+../$(MANFILE):
+	touch $@
+
 install: default $(MANFILE).gz
 	install -D -m 644 $(TARGET) $(INSTALL_MOD_PATH)$(INSTDIR)/$(TARGET)
 ifeq (,$(INSTALL_MOD_PATH))
diff --git a/igb/igb_main.c b/igb/igb_main.c
index 2dff0f4..251b755 100644
--- a/igb/igb_main.c
+++ b/igb/igb_main.c
@@ -259,6 +259,10 @@ static struct pci_error_handlers igb_err_handler = {
 static void igb_init_fw(struct igb_adapter *adapter);
 static void igb_init_dmac(struct igb_adapter *adapter, u32 pba);
 
+#if defined(CONFIG_NETMAP) || defined(CONFIG_NETMAP_MODULE)
+#include <if_igb_netmap.h>
+#endif
+
 static struct pci_driver igb_driver = {
 	.name     = igb_driver_name,
 	.id_table = igb_pci_tbl,
@@ -3041,6 +3045,10 @@ static int igb_probe(struct pci_dev *pdev,
 	/* carrier off reporting is important to ethtool even BEFORE open */
 	netif_carrier_off(netdev);
 
+#ifdef DEV_NETMAP
+	igb_netmap_attach(adapter);
+#endif /* DEV_NETMAP */
+
 #ifdef IGB_DCA
 	if (dca_add_requester(&pdev->dev) == E1000_SUCCESS) {
 		adapter->flags |= IGB_FLAG_DCA_ENABLED;
@@ -3244,6 +3252,10 @@ static void igb_remove(struct pci_dev *pdev)
 	 */
 	igb_release_hw_control(adapter);
 
+#ifdef DEV_NETMAP
+	netmap_detach(netdev);
+#endif /* DEV_NETMAP */
+
 	unregister_netdev(netdev);
 
 	igb_clear_interrupt_scheme(adapter);
@@ -3652,6 +3664,9 @@ void igb_configure_tx_ring(struct igb_adapter *adapter,
 
 	txdctl |= E1000_TXDCTL_QUEUE_ENABLE;
 	E1000_WRITE_REG(hw, E1000_TXDCTL(reg_idx), txdctl);
+#ifdef DEV_NETMAP
+	igb_netmap_configure_tx_ring(adapter, reg_idx);
+#endif /* DEV_NETMAP */
 }
 
 /**
@@ -7190,6 +7205,11 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
 	if (test_bit(__IGB_DOWN, &adapter->state))
 		return true;
 
+#ifdef DEV_NETMAP
+        if (netmap_tx_irq(tx_ring->netdev, tx_ring->queue_index))
+                return true; /* cleaned ok */
+#endif /* DEV_NETMAP */
+
 	tx_buffer = &tx_ring->tx_buffer_info[i];
 	tx_desc = IGB_TX_DESC(tx_ring, i);
 	i -= tx_ring->count;
@@ -8204,6 +8224,11 @@ static bool igb_clean_rx_irq(struct igb_q_vector *q_vector, int budget)
 	unsigned int total_bytes = 0, total_packets = 0;
 	u16 cleaned_count = igb_desc_unused(rx_ring);
 
+#ifdef DEV_NETMAP
+	if (netmap_rx_irq(rx_ring->netdev, rx_ring->queue_index, &total_packets))
+		return true;
+#endif /* DEV_NETMAP */
+
 	do {
 		struct igb_rx_buffer *rx_buffer;
 		union e1000_adv_rx_desc *rx_desc;
@@ -8522,6 +8547,11 @@ void igb_alloc_rx_buffers(struct igb_ring *rx_ring, u16 cleaned_count)
 	struct igb_rx_buffer *bi;
 	u16 i = rx_ring->next_to_use;
 
+#ifdef DEV_NETMAP
+	if (igb_netmap_configure_rx_ring(rx_ring))
+		return;
+#endif /* DEV_NETMAP */
+
 	/* nothing to do */
 	if (!cleaned_count)
 		return;
